using System.Data.Entity.ModelConfiguration;
using Nop.Core.Domain.ShareBuy;

namespace Nop.Data.Mapping.ShareBuy
{
    public partial class ShareBuyPictureMap : EntityTypeConfiguration<ShareBuyPicture>
    {
        public ShareBuyPictureMap ()
        {
            this.ToTable("ShareBuy_Picture_Mapping");
            this.HasKey(pp => pp.Id);
            this.HasRequired(pp => pp.Picture)
                .WithMany(c => c.ShareBuyPictures)
                .HasForeignKey(pp => pp.PictureId);


            this.HasRequired(pp => pp.ShareBuyItem)
                .WithMany(c => c.ShareBuyPictures)
                .HasForeignKey(pp => pp.ShareBuyItemId);
        }
    }
}